<?php
// +----------------------------------------------------------------------
// | 添加配置属性
// +----------------------------------------------------------------------
// | Copyright (c) 2015
// +----------------------------------------------------------------------
// | Author: baiping 125618036@qq.com http://www.webipcode.com
// +----------------------------------------------------------------------
// | 2015-6-29下午2:49:52
// +----------------------------------------------------------------------
?>
<?php $this->load->view('public/header');?>
<?php $this->load->view('public/head');?>
<div class="container-fluid">
	<div class="row">
		<?php $this->load->view('public/sideleft');?>
		<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ">
			<!-- 内容区 -->
			<div class="main-title">
				<h3>网站设置</h3>
			</div>
			<div class="con">
				<ul class="nav nav-tabs" role="tablist">
					<li role="presentation" <?php if($group == 1){?>class="active"<?php }?>><a href="<?php echo site_url('config/webset/')?>">网站配置</a></li>
					<li role="presentation" <?php if($group == 2){?>class="active"<?php }?>><a href="<?php echo site_url('config/webset/2')?>" >内容配置</a></li>
					<li role="presentation" <?php if($group == 3){?>class="active"<?php }?>><a href="<?php echo site_url('config/webset/3')?>">用户配置</a></li>
					<li role="presentation" <?php if($group == 4){?>class="active"<?php }?>><a href="<?php echo site_url('config/webset/4')?>">系统配置</a></li>
				</ul>
				<!-- 内容列表 -->
				<form name="creat_form" method="post" action="<?php echo site_url('config/webseted')?>" class="webset_form">
				<?php foreach ($_list as $key => $val){?>
					<div class="form-group col-md-5">
						<label><?php echo $val->title?><small class="color_9">&nbsp;&nbsp;<?php echo $val->remark?></small></label> 
						<?php if ( $val->type == 0 || $val->type == 1 ){ ?>
						<input type="text" class="form-control" id="name" name="config[<?php echo $val->name;?>]" value="<?php echo $val->value;?>" >
						<?php }elseif( $val->type == 2 || $val->type == 3){?>
						<textarea class="form-control" name="config[<?php echo $val->name?>]"><?php echo $val->value;?></textarea>
						<?php }elseif($val->type == 4){?>
						<select class="form-control" name="config[<?php echo $val->name?>]">
							<?php 
								$mj_type = parse_config_attr($val->extra);
							?>
								<?php foreach ($mj_type as $ikey => $ival){?>
								<option value="<?php echo $ikey;?>"><?php echo $ival;?></option>
								<?php }?>
						</select>
						<?php }?>
						
					</div>
					<span class="clearfix"></span>
				<?php }?>	
					<div class="form-group">
						<button type="submit" class="btn btn-primary">确认</button>
						<a class="btn btn-success" href="javascript:window.history.go(-1);">返回</a>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
//左侧菜单高亮显示
highlight_subnav( '<?php echo site_url('config/webset')?>' );
</script>
<?php $this->load->view('public/footer');?>